/**
 * @author ：wang-ting
 * @Date：2025/4/26 11:15
 */
/*
输入6个整数，先将其输出然后再将数组倒转，再次输出数组
 */
    import java.util.Scanner;
    import java.util.Arrays;
public class 数组倒序 {
    public static void main(String[] args) {
        int[] arr = new int[6];
        Scanner scanner = new Scanner(System.in);
        for (int i = 0; i < arr.length; i++) {
            arr[i] = scanner.nextInt();
        }
        System.out.println(Arrays.toString(arr));
        int j = arr.length-1;
        for(int i = 0;i < arr.length/2;i++){
            int temp = arr[j];
            arr[j] = arr[i];
            arr[i] = temp;
            j--;

        }

        // int left = 0;
        // int right = arr.length - 1;
        // while(left < right){
        //     int temp = arr[right];
        //     arr[right] = arr[left];
        //     arr[left] = temp;
        //     right--;
        //     left++;
        // }

        System.out.println(Arrays.toString(arr));
    }
}
